﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HF.WorkFlow.DataContract;
using HF.WCF.WFInterface;
using HF.User.Data;
namespace HF.WCF.WFService
{
   public  class UserService:IUserService
    {
        public int Insert(UserEntity entity)
        {
           return UserData.GetInstance().Insert(entity);
        }

        public int Update(UserEntity entity)
        {
            return UserData.GetInstance().Update(entity);
        }

        public bool Exists(string userId)
        {
           return UserData.GetInstance().Exists(userId);
        }

        public void Delete(string userId)
        {
            UserData.GetInstance().Delete(userId);
        }

        public UserEntity GetUserEntity(string userId)
        {
            return UserData.GetInstance().GetUserEntity(userId);
        }

        public List<UserEntity> GetAllUserEntitys()
        {
            return UserData.GetInstance().GetAllUserEntitys();
        }

        public bool SetPassword(string userId, string password)
        {
            return UserData.GetInstance().SetPassword(userId,password);
        }

        public string GetUserNameById(string userId)     //检查用户名
        {
            return UserData.GetInstance().GetUserNameById(userId);
        }

        public bool LoginCheck(string userId, string password)
        {
           return UserData.GetInstance().LoginCheck(userId,password);
        }

        public List<UserEntity> GetUserEntiysLikeId(string userId)
        {
            return UserData.GetInstance().GetUserEntiysLikeId(userId);
        }

        public List<UserEntity> GetUserEntiysLikeName(string userName)
        {
            return UserData.GetInstance().GetUserEntiysLikeName(userName);
        }
    }
}
